﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace ProductMonitor.Commands
{
    public class OpCommand : ICommand
    {
        public event EventHandler? CanExecuteChanged;

        private Action _Action;
        public OpCommand(Action action)
        {
            _Action = action;
        }

        public bool CanExecute(object? parameter)
        {
            return true;
        }

        public void Execute(object? parameter)
        {
            _Action?.Invoke();
        }
    }
}
